<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>{$Think.Config.__SITENAME__}</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <link href="../Public/asset/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <link href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <link href="../Public/asset/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <link href="../Public/asset/css/blue.css" rel="stylesheet" type="text/css" />
    <link href="//fonts.lug.ustc.edu.cn/icon?family=Material+Icons" rel="stylesheet">
    <link href="/Public/asset/materialize/css/materialize.min.css" type="text/css" rel="stylesheet" media="screen,projection"/>
    <link href="/Public/asset/materialize/css/style.css" type="text/css" rel="stylesheet" media="screen,projection"/>

    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
<body>
    <div class="section no-pad-bot" id="index-banner">
        <div class="container">
            <br><br>
            <a href="../index.php"><h1 class="header center blue-text">{$Think.Config.__SITENAME__}</h1></a>
        </div>
    </div>
    <div class="login-box">
        <div class="login-box-body">
                <form name="send" method="post"  >
                    <div class="form-group has-feedback">
                        <input  name="Tel" type="text" class="form-control" maxlength="11" placeholder="您的手機號"/>
                        <span class="glyphicon glyphicon-phone form-control-feedback"></span>
                    </div>
                    <div class="form-group has-feedback">
                        <input name="PreviousTel" type="text" class="form-control" maxlength="11" placeholder="推薦人賬號(選填)"/>
                        <span  class="glyphicon glyphicon-user form-control-feedback"></span>
                    </div>
                    <div class="row">
                            <button type="submit" class="btn-large waves-effect waves-light blue" style="width:100%;">提交申請</button>
                      </div>
                    <div id="msg-success" class="alert alert-info alert-dismissable" style="<?php if($sended==0 || $sended==2) echo 'display: none;'?>">
                        <button type="button" class="close" id="ok-close">&times;</button>
                        <h5><i class="icon fa fa-info"></i> 等待審核</h5>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;請確保【<b>{$TheTel}</b>】可接收短信！</br>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;一日內未得短信者可聯繫我方<b>↙</b><br/>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;幫助郵箱:<b><a href="mailto:help@ineedvpn.net">help@ineedvpn.net</a></b></br>
                        <p id="msg-success-p"></p>
                    </div>
                    <div id="msg-error" class="alert alert-warning alert-dismissable" style="<?php if($sended==0 || $sended==1) echo 'display: none;'?>">
                        <button type="button" class="close" id="error-close" aria-hidden="true">&times;</button>
                        <h4><i class="icon fa fa-warning"></i> 提交失敗!</h4>{$Info}
                        <p id="msg-error-p"></p>
                    </div>
                </form>
        </div><!-- /.login-box-body -->
    </div><!-- /.login-box -->

    <!-- jQuery 2.1.3 -->
    <script src="../Public/asset/js/jQuery.min.js"></script>
    <!-- Bootstrap 3.3.2 JS -->
    <script src="../Public/asset/js/bootstrap.min.js" type="text/javascript"></script>
    <!-- iCheck -->
    <script src="../Public/asset/js/icheck.min.js" type="text/javascript"></script>
    <script>
        $(document).ready(function(){
           
            $("html").keydown(function(event){
                if(event.keyCode==13){
                    login();
                }
            });
            $("#login").click(function(){
                login();
            });
             $("#ok-close").click(function(){
                $("#msg-success").hide(100);
            });
            $("#error-close").click(function(){
                $("#msg-error").hide(100);
            });
        })
    </script>
    <script type="text/javascript">
                // 过滤HTML标签以及&nbsp 来自：http://www.cnblogs.com/liszt/archive/2011/08/16/2140007.html
                function removeHTMLTag(str) {
                        str = str.replace(/<\/?[^>]*>/g,''); //去除HTML tag
                        str = str.replace(/[ | ]*\n/g,'\n'); //去除行尾空白
                        str = str.replace(/\n[\s| | ]*\r/g,'\n'); //去除多余空行
                        str = str.replace(/&nbsp;/ig,'');//去掉&nbsp;
                        return str;
                }
    </script>
    <script src="/Public/asset/materialize/js/materialize.min.js"></script>
    <script src="/Public/asset/materialize/js/init.js"></script>
</body>
</html>
